x,y = input().split()
a = int(x)
b = int(y)
r = a % b
while r != 0:
    a = b
    b = r
    r = a % b
print(f"{x} 与 {y} 的最大公约数为：{b}")